---
sidebar_position: 2
---

# 📦 plugin-application-insights

This plugin lets you track page views using [Microsoft Application Insights](https://www.npmjs.com/package/@microsoft/applicationinsights-web).

This plugin is only active in production mode.

## Configuration

Install the plugin

```bash npm2yarn
npm install @rise4fun/docusaurus-plugin-application-insights
```

Add the plugin to your plugin list along with the [application-insights-web configuration](https://github.com/microsoft/ApplicationInsights-JS#snippet-configuration-options) object.

```js
const config = {
    plugins: [
        ...,
        // highlight-start
        ["@rise4fun/docusaurus-plugin-application-insights", {
            config: {
                instrumentationKey: "YOUR INSTRUMENTATION KEY HERE"
            }
        }]
        // highlight-end
    ]
}
```
